class FlutterNativeBaiDuViewModel {
  int type;
  List<OverlayOption> overlayOptions;

  FlutterNativeBaiDuViewModel({this.overlayOptions, this.type = 0});

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['overlayOptions'] = overlayOptions == null
        ? null
        : overlayOptions.map((e) => e.toJson()).toList();
    data['type'] = this.type;
    return data;
  }
}

class OverlayOption {
  double latitude;
  double longitude;
  String text;
  String id;
  bool isSelect;

  OverlayOption({
    this.latitude,
    this.longitude,
    this.text,
    this.id,
    this.isSelect = false,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['latitude'] = this.latitude;
    data['longitude'] = this.longitude;
    data['text'] = this.text;
    data['id'] = this.id;
    data['isSelect'] = this.isSelect;
    return data;
  }

  OverlayOption.fromJson(Map<String, dynamic> json) {
    this.latitude = json['latitude'];
    this.longitude = json['longitude'];
    this.text = json['text'];
    this.id = json['id'];
    this.isSelect = json['isSelect'];
  }
}
